//1.请求医院所有类型
//请求医院列表参数的类型
//这点写?号 不管用户传还是不传
export interface getHospitalListSearchParamsType {
  hoscode?:number,
 hosname?:string,
 hostype?:string,
 provinceCode?:string,
 cityCode?:string,
 districtCode?:string,
 status?: 0 | 1
//  这点是字面量类型  
//let a =1  
//const a =2
}

//定义数据中bookingRule的类型  因为查看详情有的配置项相同所以组件复用
export interface BookingRuleType{
  cycle:number,
  releaseTime: string,
  stopTime: string,
  quitDay: number,
  quitTime:string,
rule:string[]
}
//返回值类型只拿data后面的全部 不要ok
//请求列表返回值中content数组中 每一条数据的类型 
export interface hospitalListItemsType {
  id: string,
  createTime: string,
  updateTime: string,
  isDeleted: number,
  param: {
    hostypeString: string,
    fullAddress: string,
  },
  hoscode: string,
  hosname: string,
  hostype: string,
  provinceCode: string,
  cityCode: string,
  districtCode: string,
  address: string,
  logoData: string
  intro: string,
  route: string,
  status: 0 | 1,
  bookingRule:  BookingRuleType | null
}



export type hospitalListContentType = hospitalListItemsType[];
 
//请求医院列表返回值类型
export interface hospitalListReqReturnType {
  content: hospitalListContentType,
  pageable: {
    sort: {
      sorted: boolean,
      unsorted: boolean,
      empty: boolean
    },
    pageNumber: number,
    pageSize: number,
    offset: number,
    paged: boolean,
    unpaged: boolean
  },
  last: boolean,
  totalPages: number,
  totalElements: number,
  first: boolean,
  sort: {
    sorted: boolean,
    unsorted: boolean,
    empty: boolean
  },
  numberOfElements: number,
  size: number,
  number: number,
  empty: boolean
} 

//2.请求省份返回值类型
export interface getProvinceItemType {
  createTime: string;
  dictCode: string;
  hasChildren: boolean;
  id: number;
  isDeleted: number;
  name: string;
  param: object;
  parentId: number;
  updateTime: string;
  value: string;
}
//写type类型时候就用数组定义 因为data是一个数组  把整体当成数组
export type getProvinceReturnType = getProvinceItemType[]


//3.医院详情的返回值类型  初始的时候不一定有这两个值所以是可选   这个是data是对象所以定义方式不同
export interface hospitalDetailReturnType {
  'bookingRule' ?:  BookingRuleType,
  'hospital' ?: hospitalListItemsType
}
//4.医院排班的返回值类型  这个是data是数组
export interface hosDepartmentType {
  depcode: string,
  depname: string,
  //因为数据是这么显示的
  childen:hosDepartmentListType | null
}

export type hosDepartmentListType = hosDepartmentType[]

//5.某个科室的排班时间请求类型
export interface hosScheduleRuleParamsType  {
  page : number,
  limit:number,
  hoscode:string,
  depcode:string,
}

//返回值类型  你拆开的话就只能这么定义了
export interface bookingScheduleListItem {
  
    workDate: string;
    workDateMd: null,
    dayOfWeek:  string;
    docCount: number,
    reservedNumber: number,
    availableNumber:number,
    status: null
}
export type bookingScheduleListItemType = bookingScheduleListItem[]

export interface hosScheduleRuleReturnTypes {    
      total:number,
   bookingScheduleList: bookingScheduleListItemType,
    baseMap: {
    hosname:string;
    }
  }

  //6.根据时间和科室获取详情
  export interface findScheduleListParamsType {
    hoscode:string;
    depcode:string;
    workDate:string;
  }

  export interface findScheduleListReturnType{
    id: string,
    createTime:string,
    updateTime: string,
    isDeleted: number,
    param: {
      dayOfWeek: string,
      depname:string,
      hosname: string,
    },
    hoscode: string,
    depcode:string,
    title: string,
    docname: string,
    skill: string,
    workDate: string,
    workTime: number,
    reservedNumber: number,
    availableNumber: number,
    amount: number,
    status: 1 | 0,
    hosScheduleId: string,
  }
  export type findScheduleListType = findScheduleListReturnType[]